<script setup>
import BigScreen from "@/components/BigScreen.vue";
import Left from "./left/index.vue";
import Center from "./center/index.vue";
import Right from "./right/index.vue";
import { onMounted, ref } from "vue";
import { getCqData, getResume } from "../../api/stud";
import { assign } from "lodash-es";

onMounted(() => {
  handleZTQKData();
  handleGetResume();
});

const leftData = ref({});
const rightData = ref();
const centerData = ref({});
async function handleZTQKData() {
  const { data } = await getCqData();
  assign(leftData.value, data);
  rightData.value = data || {};
}

async function handleGetResume() {
  const { data } = await getResume();
  assign(leftData.value, data);
  assign(centerData.value, data);
}
</script>

<template>
  <BigScreen title="大学生毕业就业AI服务">
    <template #left>
      <Left :data="leftData"></Left>
    </template>
    <template #center>
      <Center :centerData="centerData"></Center>
    </template>
    <template #right>
      <Right :data="rightData"></Right>
    </template>
  </BigScreen>
</template>

<style scoped></style>
